/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.sadhar.sipp.pembelianbarang;

import java.util.Date;
import java.util.List;
import java.util.Map;
import org.sadhar.sia.common.ClassConnection;

/**
 *
 * @author Deny Prasetyo
 */
public class PembelianBarangDAOImpl implements PembelianBarangDAO {

    @Override
    public Date listTglNotaTerbaru() throws Exception {
        String sql = "SELECT max(p.tglNota) as tglNotaTerbaru FROM asset.pembelianBarang p";
        List<Map> lm = ClassConnection.getJdbc().queryForList(sql);
        Date result = null;
        for (Map m : lm) {
            result = (java.sql.Date) m.get("tglNotaTerbaru");
        }
        return result;
    }
}
